<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>滇西科技师范学院课程表展示系统</title>
    <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <!-- Bootstrap Icons - 本地文件 -->
    <link href="{{ url_for('static', filename='css/bootstrap-icons.css') }}" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet">
</head>
<body>
    <div class="container-fluid">
        <!-- 头部 -->
        <header class="bg-primary text-white py-4 mb-4">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-md-8">
                        <h1 class="h2 mb-0">
                            <i class="bi bi-calendar3"></i>
                            滇西科技师范学院课程表展示系统
                        </h1>
                        <p class="mb-0 mt-2">信息学院 2025级 课程表查询</p>
                    </div>
                    <div class="col-md-4 text-end">
                        <div class="d-flex align-items-center justify-content-end gap-3">
                            <div class="badge bg-light text-dark fs-6">
                                <i class="bi bi-people"></i>
                                <span id="totalCount">共 0 个</span>
                            </div>
                            <a href="/scrape" class="btn btn-outline-light">
                                <i class="bi bi-download"></i>
                                数据采集
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </header>

        <!-- 主要内容 -->
        <div class="container">


            <!-- 切换标签 -->
            <div class="row mb-4">
                <div class="col-12">
                    <ul class="nav nav-tabs" id="mainTabs" role="tablist">
                        <li class="nav-item" role="presentation">
                            <button class="nav-link active" id="class-tab" data-bs-toggle="tab" data-bs-target="#class-pane" type="button" role="tab">
                                <i class="bi bi-people-fill"></i> 班级课表
                            </button>
                        </li>
                        <li class="nav-item" role="presentation">
                            <button class="nav-link" id="teacher-tab" data-bs-toggle="tab" data-bs-target="#teacher-pane" type="button" role="tab">
                                <i class="bi bi-person-badge"></i> 教师课表
                            </button>
                        </li>
                    </ul>
                </div>
            </div>

            <!-- 班级课表标签页 -->
            <div class="tab-content" id="mainTabsContent">
                <div class="tab-pane fade show active" id="class-pane" role="tabpanel">
                    <!-- 搜索和筛选 -->
                    <div class="card mb-4">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <span class="input-group-text">
                                            <i class="bi bi-search"></i>
                                        </span>
                                        <input type="text" class="form-control" id="classSearchInput" placeholder="搜索班级名称...">
                                    </div>
                                </div>
                                <div class="col-md-2">
                                    <input type="text" class="form-control" id="classYearFilter" placeholder="年级">
                                </div>
                                <div class="col-md-2">
                                    <input type="text" class="form-control" id="classSemesterFilter" placeholder="学期">
                                </div>
                                <div class="col-md-2">
                                    <input type="text" class="form-control" id="classCollegeFilter" placeholder="学院">
                                </div>
                                <div class="col-md-2">
                                    <button type="button" class="btn btn-primary w-100" id="classSearchBtn">
                                        <i class="bi bi-search"></i> 搜索
                                    </button>
                                </div>
                            </div>
                            <div class="row mt-2">
                                <div class="col-12">
                                    <button type="button" class="btn btn-outline-secondary btn-sm" id="classClearFilter">
                                        <i class="bi bi-x-circle"></i> 清除筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 班级列表 -->
                    <div class="row" id="classList">
                        <!-- 班级卡片将通过JavaScript动态加载 -->
                    </div>

                    <!-- 班级分页 -->
                    <div class="row mt-4">
                        <div class="col-12" id="classPagination">
                            <!-- 分页将通过JavaScript动态生成 -->
                        </div>
                    </div>

                    <!-- 无数据提示 -->
                    <div class="text-center py-5" id="noClassData" style="display: none;">
                        <i class="bi bi-calendar-x display-1 text-muted"></i>
                        <h3 class="mt-3 text-muted">暂无班级课程表数据</h3>
                        <p class="text-muted">请先运行数据采集程序获取课程表数据</p>
                    </div>
                </div>

                <!-- 教师课表标签页 -->
                <div class="tab-pane fade" id="teacher-pane" role="tabpanel">
                    <!-- 搜索和筛选 -->
                    <div class="card mb-4">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="input-group">
                                        <span class="input-group-text">
                                            <i class="bi bi-search"></i>
                                        </span>
                                        <input type="text" class="form-control" id="teacherSearchInput" placeholder="搜索教师姓名或工号...">
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control" id="teacherDepartmentFilter" placeholder="部门">
                                </div>
                                <div class="col-md-3">
                                    <input type="text" class="form-control" id="teacherSemesterFilter" placeholder="学期">
                                </div>
                                <div class="col-md-2">
                                    <button type="button" class="btn btn-primary w-100" id="teacherSearchBtn">
                                        <i class="bi bi-search"></i> 搜索
                                    </button>
                                </div>
                            </div>
                            <div class="row mt-2">
                                <div class="col-12">
                                    <button type="button" class="btn btn-outline-secondary btn-sm" id="teacherClearFilter">
                                        <i class="bi bi-x-circle"></i> 清除筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 教师列表 -->
                    <div class="row" id="teacherList">
                        <!-- 教师列表将通过JavaScript动态加载 -->
                    </div>

                    <!-- 教师分页 -->
                    <div class="row mt-4">
                        <div class="col-12" id="teacherPagination">
                            <!-- 分页将通过JavaScript动态生成 -->
                        </div>
                    </div>

                    <!-- 无数据提示 -->
                    <div class="text-center py-5" id="noTeacherData" style="display: none;">
                        <i class="bi bi-person-x display-1 text-muted"></i>
                        <h3 class="mt-3 text-muted">暂无教师课程表数据</h3>
                        <p class="text-muted">请先运行数据采集程序获取教师课程表数据</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-light mt-5 py-4">
        <div class="container">
            <div class="row">
                <div class="col-md-12 text-center">
                    <p class="mb-2 text-muted">
                        🏫 滇西科技师范学院 → 信息学院 | 
                        👤 <strong>张绕坤</strong> | 
                        ✉️ <a href="mailto:2986517697@qq.com" class="text-decoration-none">2986517697@qq.com</a> | 
                        📱 15391430821
                    </p>
                    <p class="mb-0 text-muted small">
                        💡 功能点反馈，有建议欢迎找我！欢迎提出宝贵意见和建议，一起完善这个系统！
                    </p>
                    <p class="mt-2 mb-0 text-muted small">
                        💻 让我们一起打造更好的课程表管理系统！
                    </p>
                </div>
            </div>
        </div>
    </footer>

    <!-- 加载提示 -->
    <div class="loading-overlay" id="loadingOverlay" style="display: none;">
        <div class="loading-spinner">
            <div class="spinner-border text-primary" role="status">
                <span class="visually-hidden">加载中...</span>
            </div>
            <p class="mt-3">正在加载课程表...</p>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/index_clean.js') }}?v=20250924"></script>
</body>
</html>
